package map_1113;

import java.util.Collection;
import java.util.Map;
import java.util.Set;
import java.util.TreeMap;

public class Demo {
    public static class Hello {}

    public static void main(String[] args) {
        Hello hello;
        TreeMap<Long, String> map = new TreeMap<>();
        map.put(1L, "一");
        map.put(2L, "一");

        Set<Long> longs = map.keySet();
        System.out.println(longs);

        Collection<String> values = map.values();
        System.out.println(values);

        Set<Map.Entry<Long, String>> entries = map.entrySet();

        for (Map.Entry<Long, String> entry : entries) {
            System.out.println(entry.getKey());
            System.out.println(entry.getValue());
            entry.setValue("三");
        }

        System.out.println(map);
    }
}
